<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>关闭广告</title>
  <style>
    img{
      display: inline-block;
      position: absolute;
      top: 200px;
      left: 300px;
    }
    .text {
      position: absolute;
      top: 180px;
      left: 300px;
      color: #ec6161;
    }
    button{
      position: absolute;
      top:200px;
      left: 282px;
      text-align: center;
      border: none;
      color: #ec6161;
    }
  </style>
</head>
<body>
<button>x</button>
<img src="images/tao.png">
<div class="text">淘宝二维码</div>

<script>
  var img=document.querySelector("img");
  var btn=document.querySelector("button");
  var tt=document.querySelector(".text");
  btn.onclick=function(){
    img.parentNode.removeChild(img);
    btn.parentNode.removeChild(btn);
    tt.parentNode.removeChild(tt);
  }
</script>
</body>
</html>